package com.jiayi.microservice.controller;

import com.jiayi.microservice.pojo.Order;
import com.jiayi.microservice.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: CONCENTRATE
 * @time: 2018/11/4.
 */
@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping(value="/order/{orderId}")
    public Order queryOrderById(@PathVariable(name="orderId") String orderId){
        return orderService.queryOrderById(orderId);
    }
}
